package cn.wzl.tanks;

import cn.wzl.tanks.abstractfactory.BaseFactory;
import cn.wzl.tanks.abstractfactory.Bullet;
import cn.wzl.tanks.abstractfactory.Tank;
import cn.wzl.tanks.abstractfactory.YellowFactory;

/**
 * @author weiZhiLin
 * @version 1.0
 * @date 2021/6/4 13:54
 */
public class DefaultFire implements Fire {
    BaseFactory bf = new YellowFactory();
    @Override
    public void fire(Tank tank) {
//        new Bullet(tank.getX(), tank.getY(), tank.getDir(), tank.getFrame(), tank.getGroup());
        bf.creatBullet(tank.getX(), tank.getY(), tank.getDir(), tank.getFrame(), tank.getGroup());
    }
}
